//
//  UIButton+BCWebImage.h
//  BCWebImageKit
//
//  Created by Basic on 2018/5/24.
//  UIButton web图片加载扩展


#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface UIButton (BCWebImage)

//MARK: - Image
/**
 设置某个状态的image的url

 @param urlStr urlStr description
 @param state state description
 */
- (void)bc_setImageWithURL:(nullable NSString *)urlStr forState:(UIControlState)state;

/**
 设置某个状态的image的url，可设置默认图

 @param urlStr urlStr description
 @param state state description
 @param placeholder placeholder description
 */
- (void)bc_setImageWithURL:(nullable NSString *)urlStr forState:(UIControlState)state placeholderImage:(nullable UIImage *)placeholder;

//MARK: - Background image
/**
 设置某个状态的背景图的url
 
 @param urlStr urlStr description
 @param state state description
 */
- (void)bc_setBackgroundImageWithURL:(nullable NSString *)urlStr forState:(UIControlState)state;
/**
 设置某个状态的背景的url，可设置默认图
 
 @param urlStr urlStr description
 @param state state description
 */
- (void)bc_setBackgroundImageWithURL:(nullable NSString *)urlStr forState:(UIControlState)state placeholderImage:(nullable UIImage *)placeholder;

//MARK: - 取消
/**
 取消某个状态的图片加载

 @param state state description
 */
- (void)bc_cancelImageLoadForState:(UIControlState)state;

/**
 取消某个状态的背景图片加载

 @param state state description
 */
- (void)bc_cancelBackgroundImageLoadForState:(UIControlState)state;
@end

NS_ASSUME_NONNULL_END
